import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class HanoiTower {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        move(3, 'A', 'B', 'C');

        try {
            for (String msg : steps) {
                System.out.print(msg);
                System.out.println("\tpress [Enter] to continue...");
                br.readLine();
            }
            br.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    static ArrayList<String> steps = new ArrayList<String>();

    public static void move(int step, char from, char middle, char to) {
        if (step == 1) {
            steps.add("将" + step + "从" + from + "复制到" + to);
        } else {
            move(step - 1, from, to, middle);
            steps.add("将" + step + "从" + from + "复制到" + to);
            move(step - 1, middle, from, to);
        }
    }
}
